/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.chlitina.store.common.config.Global;
import com.chlitina.store.common.web.BaseController;
import com.chlitina.store.modules.expert.entity.SolutionFace;
import com.chlitina.store.modules.expert.service.SolutionFaceService;

/**
 * 面部护理方案Controller
 * @author lvbo
 * @version 2013-06-07
 */
@Controller
@RequestMapping(value = Global.ADMIN_PATH+"/expert/solutionFace")
public class SolutionFaceController extends BaseController {

	@Autowired
	private SolutionFaceService solutionFaceService;
	
	@ModelAttribute
	public SolutionFace get(@RequestParam(required=false) Long id) {
		if (id != null){
			return solutionFaceService.get(id);
		}else{
			return new SolutionFace();
		}
	}
	
	@RequestMapping(value = {"detail", "desc"})
	public String detail(SolutionFace solutionFace, Model model) {
		model.addAttribute("solutionFace", solutionFace);
		return "modules/expert/solutionFaceDetail";
	}
}
